package com.mycompany.ui.panel.searches;



import org.springframework.beans.factory.annotation.Autowired;

import com.mycompany.config.Injector;
import com.mycompany.repositories.UserRepository;
import com.vaadin.data.util.BeanItemContainer;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Table;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.themes.Runo;



public class GenericSearchPanel extends Panel {
	
	
	protected VerticalLayout verticalLayout = new VerticalLayout();
	protected GridLayout gridLayout = new GridLayout();
	
	protected TextField field1 = new TextField ();
	protected TextField field2 = new TextField ();
	protected TextField field3 = new TextField();
	protected TextField field4 = new TextField();
	protected TextField field5 = new TextField();
	protected Button button = new Button("Ricerca");
	
	protected Table tabellaRisultati = new Table();
	
	
	protected BeanItemContainer beanItemContainer;
	
	@Autowired
	UserRepository userRepository;

	public GenericSearchPanel() {
		
		Injector.inject(this);
		// TODO Auto-generated constructor stub
		setCaption("Ricerca Clienti");
		verticalLayout.setSpacing(true);
		addTableFeatures();
		
		
		
	}

	

	private void addTableFeatures() {
		// TODO Auto-generated method stub
		tabellaRisultati.addStyleName(Runo.TABLE_SMALL);
		tabellaRisultati.setSizeFull();
	}


//	protected GridLayout createGridLayout() {
//		return null;
//	}


	public BeanItemContainer getBeanItemContainer() {
		return beanItemContainer;
	}

	public void setBeanItemContainer(BeanItemContainer beanItemContainer) {
		this.beanItemContainer = beanItemContainer;
	}

	
	
}
